#[[
#@layoutT("列表首页")
#define main()
<div class="container-wrap">
	#@formStart()
		#@queryStart('关键词搜索')
		   <input type="search" name="keyword" autocomplete="off" class="layui-input" placeholder="关键词搜索"/>
		#@queryEnd()		
	#@formEnd()
	
	#@table()
</div>
#end

#define js()
<!-- 分页表格 -->
<script>
]]#
	var object="#(objectName)";
	var addViewCode="#(objectName)_add";
	var updateViewCode="#(objectName)_edit";
	var configName="#(configName??'main')";
	gridArgs.title='#(tableComment)';
	gridArgs.dataId='#(primaryKey)';
#[[
	gridArgs.deleteUrl='#(path)/portal/form/business/delete?object='+object+'&primaryKey='+gridArgs.dataId+'&configName='+configName;
	gridArgs.updateUrl='#(path)/portal/form/business/edit?object='+object+'&primaryKey='+gridArgs.dataId+'&viewCode='+updateViewCode+'&configName='+configName+'&id=';
	gridArgs.addUrl='#(path)/portal/form/business/add?viewCode='+addViewCode+'&configName='+configName;
	gridArgs.gridDivId ='maingrid';
	initGrid({id : 'maingrid'
			,elem : '#maingrid'
			,toolbar:'#table_toolbar'//开启头部工具栏，并为其绑定左侧模板
			,cellMinWidth: 80
			,cols : [ [
]]#					#(tableItem)															
#[[					{title: '操作',fixed:'right',width : 180,align : 'left',toolbar : '#bar_maingrid'} // 这里的toolbar值是模板元素的选择器
			] ]
			,url:"#(path)/portal/form/business/list"
			,where:{"object":object,"primaryKey":gridArgs.dataId,"configName":configName}
			,searchForm : 'searchForm'
		});
</script>

#end
]]#